package org.fullhappy.bean;

import java.util.ArrayList;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import org.fullhappy.business.ArticleServise;
import org.fullhappy.entity.Article;

@ManagedBean
@SessionScoped
public class TutorialHomeBean {
	
	private ArrayList<Article> listArticles;
	private ArticleServise articleServise;
	private long focus;
	@PostConstruct
	void init(){
		focus=0;
		articleServise = new ArticleServise();
		listArticles = articleServise.search(focus*10,10L);
	}
	public ArrayList<Article> getListArticles() {
		return listArticles;
	}
	public void setListArticles(ArrayList<Article> listArticles) {
		this.listArticles = listArticles;
	}
	public ArticleServise getArticleServise() {
		return articleServise;
	}
	public void setArticleServise(ArticleServise articleServise) {
		this.articleServise = articleServise;
	}
	public long getFocus() {
		return focus;
	}
	public void setFocus(long focus) {
		this.focus = focus;
	}
	
	

}
